package com.jsj.mapper;

import com.jsj.pojo.*;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface HistoryMapper {
    //三个关键字查询
    List<DeviceHistory> queryDeviceHistory(String deviceName);
    List<BorrowHistory> queryBorrowHistory(String deviceName);
    List<RepairHistory> queryRepairHistory(String deviceName);
    //三个删除记录
    Boolean delDeviceHistoryById(int historyId);
    Boolean delBorrowHistoryById(int historyId);
    Boolean delRepairHistoryById(int historyId);
    //清空所有历史记录
    Boolean delAllHistory();
    //添加到历史记录
    Boolean addDeviceHistory(DeviceHistory device);
    Boolean addBorrowHistory(BorrowHistory borrow);
    Boolean addRepairHistory(RepairHistory repair);
    //清空device history表历史记录
    public Boolean delDeviceHistory();
    public Boolean delBorrowHistory();
    public Boolean delRepairHistory();

}
